#coding:utf-8
from student_grade_manager import grade
from student_grade_manager import students

'''
sno,name,age,province
chinese,math,english,pe
'''

#增删改查四个功能函数

def add():
    data_dict = read_file()
    sno_input = input("输入你要修改的学号：")
    if sno not in data_dict.keys():
        print("不存在该学号！")
        return 1
    else:




#学生成绩管理信息读取和存储函数
def read_file():   #返回一个字典
    try:
        with open("data_base.pkl","rb") as f:
            return pickle.load(f)
    except IOError as e:
        return 1
    except Exception as e:
        raise e

def save_file(dict_data):  #这里直接吧字典读进去，所以在每次存储的时候可能要先read一遍，免得文件被覆盖
    try:
        with open("data_base.pkl","wb") as f:
            pickle.dump(dict_data,f)
            return True
    except IOError as e:
        return False
    except Exception as e:
        raise e










